package practise;

public class MissingNumber {
    public int missingNumber(int[] nums) {
        int miss = 0;
        for (int i = 1; i <= nums.length; i++) {
            miss ^= i;
            miss ^= nums[i - 1];
        }
        return miss;
    }
}
